﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>职称设置</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@3.3.4/dist/vue.global.min.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css">
    <script src="https://unpkg.com/element-plus/dist/index.full.min.js"></script>
    <style>
        .txt_bg {
            background-color: #FFD553;
        }

        #app table tr td {
            border: 1px solid #000000;
            margin: 3px;
        }

        body {
            background-color: #FFFFCC;
        }
        td {
            padding: 3px;
        }

        .avatar-uploader .el-upload {
            border: 1px dashed #d9d9d9;
            border-radius: 6px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

            .avatar-uploader .el-upload:hover {
                border-color: #409EFF;
            }

        .avatar-uploader-icon {
            font-size: 28px;
            color: #8c939d;
            width: 228px;
            height: 228px;
            line-height: 228px;
            text-align: center;
        }

        .avatar {
            width: 228px;
            height: 228px;
            display: block;
        }

        .top_gn{
            text-align:right;
            margin:5px;
        }

    </style>
</head>
<body>
    <div id="app">
        <div>您正在做的业务是：人力资源--招聘管理--简历管理--简历登记</div>
        <div>
            <div class="top_gn">
                <input type="radio" name="ms" v-model="jy" value="建议面试">建议面试&nbsp;
                <input type="radio" name="ms" v-model="jy" value="建议笔试">建议笔试&nbsp;
                <input type="radio" name="ms" checked v-model="jy" value="建议录用">建议录用&nbsp;
                <input type="radio" name="ms" v-model="jy" value="删除简历">删除简历&nbsp;
                <button v-on:click="upd">提交</button>
            </div>
            
            <table>
                <tr>
                    <td width="90px" class="txt_bg">职位分类</td>
                    <td width="150px"><el-input v-model="formData.HumanMajorKindName" readonly></el-input></td>
                    <td width="90px" class="txt_bg">职位名称</td>
                    <td width="150px"><el-input v-model="formData.HunmaMajorName" readonly></el-input></td>
                    <td width="90px" class="txt_bg">招聘类型</td>
                    <td width="140px"><el-input v-model="formData.EngageType" readonly></el-input></td>
                    <td colspan="2" rowspan="6">
                        <!-- 头像 -->
                        <el-upload class="avatar-uploader"
                                   ref="upload"
                                   action="/ER_Add/WJS"
                                   :show-file-list="false"
                                   :on-success="handleAvatarSuccess"
                                   :before-upload="beforeAvatarUpload">
                            <img v-if="imageUrl" :src="imageUrl" class="avatar">
                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                        </el-upload>
                    </td>
                </tr>
                <tr>
                    <td class="txt_bg">姓名</td>
                    <td><el-input v-model="formData.HumanName" readonly placeholder="请输入姓名"></el-input></td>
                    <td class="txt_bg">性别</td>
                    <td><el-input v-model="formData.HumanSex" readonly></td>
                    <td class="txt_bg">EMAIL</td>
                    <td><el-input v-model="formData.HumanEmail" readonly placeholder="请输入邮箱"></el-input></td>
                </tr>
                <tr>
                    <td class="txt_bg">电话</td>
                    <td><el-input v-model="formData.HumanTelephone" readonly placeholder="请输入电话"></el-input></td>
                    <td width="90px" class="txt_bg">家庭电话</td>
                    <td><el-input v-model="formData.HumanHomephone" readonly placeholder="请输入家庭电话"></el-input></td>
                    <td class="txt_bg">手机</td>
                    <td><el-input v-model="formData.HumanMobilephone" readonly placeholder="请输入手机"></el-input></td>
                </tr>
                <tr>
                    <td class="txt_bg">住址</td>
                    <td colspan="3"><el-input v-model="formData.HumanAddress" readonly placeholder="请输入住址"></el-input></td>
                    <td class="txt_bg">邮编</td>
                    <td><el-input v-model="formData.HumanPostcode" readonly placeholder="请输入邮编"></el-input></td>
                </tr>
                <tr>
                    <td class="txt_bg">国籍</td>
                    <td><el-input v-model="formData.HumanNationality" readonly placeholder="请输入出生地"></el-input></td>
                    <td class="txt_bg">出生地</td>
                    <td><el-input v-model="formData.HumanBirthplace" readonly placeholder="请输入出生地"></el-input></td>
                    <td class="txt_bg">生日</td>
                    <td><el-date-picker v-model="formData.HumanBirthday" readonly type="date" placeholder="请选择日期"></el-date-picker></td>
                </tr>
                <tr>
                    <td class="txt_bg">民族</td>
                    <td><el-input v-model="formData.HumanRace" readonly></td>
                    <td class="txt_bg">宗教信仰</td>
                    <td><el-input v-model="formData.HumanReligion" readonly></td>
                    <td class="txt_bg">政治面貌</td>
                    <td><el-input v-model="formData.HumanParty" readonly></td>
                </tr>
                <tr>
                    <td class="txt_bg">身份证号码</td>
                    <td><el-input v-model="formData.HumanIdcard" readonly placeholder="请输入身份证号码"></el-input></td>
                    <td class="txt_bg">年龄</td>
                    <td><el-input v-model="formData.HumanAge" readonly placeholder="请输入年龄"></el-input></td>
                    <td class="txt_bg">毕业院校</td>
                    <td><el-input v-model="formData.HumanCollege" readonly placeholder="请输入毕业院校"></el-input></td>
                    <td class="txt_bg">学历</td>
                    <td><el-input v-model="formData.HumanEducatedDegree" readonly></td>
                </tr>
                <tr>
                    <td class="txt_bg">教育年限</td>
                    <td><el-input v-model="formData.HumanEducatedYears" readonly></td>
                    <td class="txt_bg">学历专业</td>
                    <td><el-input v-model="formData.HumanEducatedMajor" readonly></td>
                    <td class="txt_bg">薪酬要求</td>
                    <td><el-input v-model="formData.DemandSalaryStandard" readonly placeholder="请输入薪酬要求"></el-input></td>
                    <td class="txt_bg">注册时间</td>
                    <td>
                        <el-input type="text" v-model="formData.RegisterTime" readonly name="RegistTime" />
                    </td>
                </tr>
                <tr>
                    <td class="txt_bg">特长</td>
                    <td><el-input v-model="formData.HumanSpeciality" readonly></td>
                    <td class="txt_bg">爱好</td>
                    <td><el-input v-model="formData.HumanHobby" readonly></td>
                    <td class="txt_bg">推荐人</td>
                    <td><el-input v-model="formData.Referrers" readonly></td>
                    <td class="txt_bg">推荐时间</td>
                    <td><el-input v-model="formData.Recommended_time" readonly></td>
                </tr>
                <tr>
                    <td class="txt_bg">个人履历</td>
                    <td colspan="7">
                        <el-input v-model="formData.HumanHistoryRecords" readonly type="textarea" :rows="3" placeholder="请输入个人履历"></el-input>
                    </td>
                </tr>
                <tr>
                    <td class="txt_bg">备注</td>
                    <td colspan="7">
                        <el-input v-model="formData.Remark" readonly type="textarea" :rows="3" placeholder="请输入备注"></el-input>
                    </td>
                </tr>
                <tr>
                    <td class="txt_bg">推荐意见</td>
                    <td colspan="7">
                        <el-input readonly v-model="formData.recomandation" type="textarea" :rows="3" placeholder="请输入备注"></el-input>
                    </td>
                </tr>
                <tr>
                    <td class="txt_bg">面试次数</td>
                    <td>
                        <el-input v-model="formData2.InterviewAmount" readonly></el-input>
                    </td>
                    <td class="txt_bg">形象评价</td>
                    <td><el-input v-model="formData2.v1" readonly></el-input></td>
                    <td class="txt_bg">口才评价</td>
                    <td><el-input v-model="formData2.v2" readonly></el-input></td>
                    <td class="txt_bg">外语口语能力</td>
                    <td><el-input v-model="formData2.v3" readonly></el-input></td>
                </tr>
                <tr>
                    <td class="txt_bg">应变能力</td>
                    <td><el-input v-model="formData2.v4" readonly></el-input></td>
                    <td class="txt_bg">EQ</td>
                    <td><el-input v-model="formData2.v5" readonly></el-input></td>
                    <td class="txt_bg">IQ</td>
                    <td><el-input v-model="formData2.v6" readonly></el-input></td>
                    <td class="txt_bg">综合素质</td>
                    <td><el-input v-model="formData2.v7" readonly></el-input></td>
                </tr>
                <tr>
                    <td class="txt_bg">面试人</td>
                    <td><el-input v-model="formData2.msr" readonly></el-input></td>
                    <td class="txt_bg">面试时间</td>
                    <td><el-input v-model="formData2.mssj" readonly></el-input></td>
                    <td class="txt_bg">筛选人</td>
                    <td><input type="text" value="@Context.Session.GetString("PName")" name="Register" readonly></td>
                    <td class="txt_bg">筛选时间</td>
                    <td><el-input v-model="tm" readonly></el-input></td>
                </tr>
                <tr>
                    <td class="txt_bg">录用申请审核意见</td>
                    <td colspan="7">
                        <el-input v-model="jy" readonly type="textarea" :rows="3"></el-input>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <script>
        const { createApp, ref, reactive, onMounted } = Vue;
        const app = createApp({
            setup() {
                // 表单数据
                const formData = reactive({
                    HumanName: '',//姓名
                    HumanEmail: '',//email
                    HumanTelephone: '',//电话号码
                    HumanHomephone: '',//家庭电话
                    HumanMobilephone: '',//手机
                    HumanAddress: '',//地址
                    HumanPostcode: '',//邮编
                    HumanBirthplace: '',//出生地
                    HumanBirthday: '',//生日
                    HumanIdcard: '',//请输入身份证号码
                    HumanAge: '',//年龄
                    HumanCollege: '',//薪酬要求
                    DemandSalaryStandard: '',//毕业院校
                    RegisterTime: '',//注册时间
                    HumanHistoryRecords: '',//个人履历
                    Remark: '',//备注
                    HumanMajorKindId: '',//职位分类编号
                    HumanMajorKindName: '',//职位分类名称
                    HumanMajorId: '',//职位编号
                    HunmaMajorName: '',//职位名称
                    EngageType:'',//招聘类型
                    HumanSex:'',//性别
                    HumanNationality:'',//国籍
                    HumanRace:'',//名族
                    HumanReligion:'',//宗教信仰
                    HumanParty:'',//政治面貌
                    HumanEducatedYears:'',//教育年限
                    HumanEducatedDegree:'',//学历
                    HumanEducatedMajor:'',//学历专业
                    HumanSpeciality:'',//特长
                    HumanHobby:'',//爱好
                    Register:'',//推荐人
                    Referrers:'',//推荐人
                    Recommended_time:'',//推荐时间
                    Recomandation:''//推荐意见
                });
                const formData2 = reactive({
                    InterviewAmount: '',
                    v1:'',
                    v2:'',
                    v3:'',
                    v4:'',
                    v5:'',
                    v6:'',
                    v7:'',
                    msr:'',
                    mssj:''
                });
                const id = ref(0);
                const imageUrl = ref('');

                function fill(id){
                    axios.get('/ERAndEI_AUS/SelectById_ER',{
                        params:{
                            id:id
                        }
                    })
                    .then(res=>{
                        console.log(res.data.zhi)
                        formData.HumanName = res.data.zhi.human_name
                        formData.HumanEmail = res.data.zhi.human_email
                        formData.HumanTelephone = res.data.zhi.human_telephone
                        formData.HumanHomephone = res.data.zhi.human_homephone
                        formData.HumanMobilephone = res.data.zhi.human_mobilephone
                        formData.HumanAddress = res.data.zhi.human_address
                        formData.HumanPostcode = res.data.zhi.human_postcode
                        formData.HumanBirthplace = res.data.zhi.human_birthplace
                        formData.HumanBirthday = res.data.zhi.human_birthday
                        formData.HumanIdcard = res.data.zhi.human_idcard
                        formData.HumanAge = res.data.zhi.human_age
                        formData.HumanCollege = res.data.zhi.human_college
                        formData.DemandSalaryStandard = res.data.zhi.demand_salary_standard
                        formData.RegisterTime = res.data.zhi.regist_time
                        formData.HumanHistoryRecords = res.data.zhi.human_history_records
                        formData.Remark = res.data.zhi.remark
                        formData.HumanMajorKindName = res.data.zhi.human_major_kind_name
                        formData.HunmaMajorName = res.data.zhi.human_major_name
                        formData.EngageType = res.data.zhi.engage_type
                        formData.HumanSex = res.data.zhi.human_sex
                        formData.HumanNationality = res.data.zhi.human_nationality
                        formData.HumanRace = res.data.zhi.human_race
                        formData.HumanReligion = res.data.zhi.human_religion
                        formData.HumanParty = res.data.zhi.human_party
                        formData.HumanEducatedYears = res.data.zhi.human_educated_years
                        formData.HumanEducatedDegree = res.data.zhi.human_educated_degree
                        formData.HumanEducatedMajor = res.data.zhi.human_educated_major
                        formData.HumanSpeciality = res.data.zhi.human_specility
                        formData.HumanHobby = res.data.zhi.human_hobby
                        formData.Register = res.data.zhi.register
                        imageUrl.value = res.data.zhi.human_picture
                        formData.Referrers = res.data.zhi.referrers
                        formData.Recommended_time = res.data.zhi.recommended_time
                        formData.Recomandation = res.data.zhi.recomandation
                    })
                }

                const jlid = ref('');

                function fill2(){
                    axios.get('/EI_SX/SelectById_EI',{
                        params:{
                            id:id.value
                        }
                    })
                    .then(res=>{
                        console.log(res.data.zhi)
                        formData2.InterviewAmount = res.data.zhi.interview_amount
                        formData2.v1 = res.data.zhi.image_degree
                        formData2.v2 = res.data.zhi.native_language_degree
                        formData2.v3 = res.data.zhi.foreign_language_degree
                        formData2.v4 = res.data.zhi.response_speed_degree
                        formData2.v5 = res.data.zhi.eQ_degree
                        formData2.v6 = res.data.zhi.iQ_degree
                        formData2.v7 = res.data.zhi.multi_quality_degree
                        formData2.msr = res.data.zhi.register
                        formData2.mssj = res.data.zhi.registe_time
                        fill(res.data.zhi.resume_id)
                        jlid.value = res.data.zhi.resume_id
                    })
                }

                // 初始化
                onMounted(() => {
                    const urlParams = new URLSearchParams(window.location.search);
                    id.value = urlParams.get('id');
                    fill2()
                });

                

                const num = ref('');//面试次数
                const msr = ref("@Context.Session.GetString("PName")")//面试人
                const registTime = ref('')//面试时间
                const mspj = ref('')
                const jy = ref('建议录用')

               const tm = ref('')
              //当前时间
              function updateTime() {
                const now = new Date();

                // 格式化日期时间
                const year = now.getFullYear();
                const month = String(now.getMonth() + 1).padStart(2, '0');
                const day = String(now.getDate()).padStart(2, '0');
                const hours = String(now.getHours()).padStart(2, '0');
                const minutes = String(now.getMinutes()).padStart(2, '0');
                const seconds = String(now.getSeconds()).padStart(2, '0');
                tm.value = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
              }

        // 立即更新一次时间
        updateTime();
        // 每秒更新一次
        setInterval(updateTime, 1000);

        function upd(){
            const zt = ref(0);
            if(jy.value=="建议面试"){
                zt.value = 0
            }
            if(jy.value=="建议笔试"){
                zt.value = 2
            }
            if(jy.value=="建议录用"){
                zt.value = 1
            }
            if(jy.value=="删除简历"){
                zt.value = -1
            }
            axios.get("/EI_SX/Upd_EIAndRR",{
                params:{
                     id:id.value,
                     jlid:jlid.value,
                     zt:zt.value
                }
            })
            .then(res=>{
                if(res.data.zhi=="ok"){
                    ElementPlus.ElMessage.success('操作成功');
                        setTimeout(() => {
                            window.location.href = "/EI_SX/Index";
                        }, 1000);
                }
            })
        }

                return {
                    formData,
                    formData2,
                    imageUrl,
                    num,
                    registTime,
                    mspj,
                    jy,
                    tm,
                    upd
                };
            }
        });

        app.use(ElementPlus);
        app.mount('#app');
    </script>
</body>
</html>